set.seed(123)
#require(gRbase) #for faster computations in the internal functions
require(hash)
#simulate a dataset with continuous data
dataset <- matrix( runif(1000 * 50, 1, 100), ncol = 50 )
#define a simulated class variable
target <- 3 * dataset[, 10] + 2 * dataset[, 20] + 3 * dataset[, 30] + rnorm(1000, 0, 5)
a1 <- bic.fsreg(target, dataset, robust = FALSE, tol = 2, ncores = 1 )
a2 <- bic.fsreg(target, dataset, robust = TRUE, tol = 2, ncores = 1 )
a3 <- MMPC(target, dataset, robust= FALSE, ncores = 1)
target <- round(target)
b1 <- bic.fsreg(target, dataset, robust = FALSE, tol = 2, ncores = 1 )
b2 <- bic.fsreg(target, dataset, robust = TRUE, tol = 2, ncores = 1 )
#b3 <- MMPC(target, dataset, robust= FALSE, ncores = 1)
Run the code above in your browser using DataLab